#include "charge.h"
// Time
// transform time from 10:00 to 600 minute
int MinuteTime(char Period[6])
    {
        return ((Period[0] - '0') * 600 + (Period[1] - '0') * 60 + (Period[3] - '0') * 10 + (Period[4] - '0'));
    }
int TimeDuration(char ArriveTime[6], char DriveAwayTime[6])
    {
        return MinuteTime(DriveAwayTime) - MinuteTime(ArriveTime);
    }
int Cost(int Rate, int Min)
    {
        return Min * Rate;
    }
void CheckOut(Car *ThisCar, int RatePerMin)
    {
        printf("%s should pay: %d $", ThisCar->ID, Cost(RatePerMin, TimeDuration(ThisCar->ArriveTime, ThisCar->DriveAwayTime)));
        getchar();
        getchar();
    }